<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <script src="js/mui.min.js"></script>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
			<!--<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>-->
			<h1 class="mui-title">欢迎登录</h1>
		</header>
		<div class="mui-content">
			<div id="input_example" class="mui-input-group" style="margin-top: 30px;">
			    <div class="mui-input-row">
			        <label>用户名：</label>
			        <input id="username" type="text" class="mui-input-clear" placeholder="请输入用户名">
			    </div>
			    <div class="mui-input-row">
			        <label>密码：</label>
			        <input id="password" type="password" class=" mui-input-password" placeholder="请输入密码">
			    </div>
			 </div>
			<div class="mui-button-row" style="margin-top:30px">
			        <button onclick="tz()" type="button" data-loading-text="登录中" class="mui-btn mui-btn-primary" style="width:80%;height: 40px;">登录</button>
			      <!--  <button type="button" class="mui-btn mui-btn-danger" >取消</button> -->
			</div>
			
			
		</div>
		<script type="text/javascript">
			mui(document.body).on('tap', '.mui-btn', function(e) {
			mui("#input_example input").each(function() {
				//若当前input为空，则alert提醒 
				if(!this.value || this.value.trim() == "") {
				    var label = this.previousElementSibling;
				    mui.alert(label.innerText + "不允许为空");
				    check = false;
				    return false;
				}else{
					check =true;				
					location.assign("me.html");
				    console.log(0);
				}
			}); //校验通过，继续执行业务逻辑 
			

			
			
			});
		</script>
</body>
</html>